<?php
require_once("vcl/vcl.inc.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class contact_us extends Page
{
       public $hfNick = null;
       public $imgChat = null;
       public $Label2 = null;
       public $Label1 = null;
       public $imgSkype = null;
       public $Image1 = null;
       function contact_usCreate($sender, $params)
       {
       $this->hfNick->setValue($_SESSION['username']);
       }

       function imgChatJSClick($sender, $params)
       {

       ?>
       var nick = document.getElementById('hfNick').value;

       var win_height = 600;
       var win_width = 800;
       var height = window.outerHeight;
       var width = window.outerWidth;
       var top = Math.round((height-win_height)/2);
       var left = Math.round((width-win_width)/2);
       window.open('chat/?nick='+nick,'Chat','scrollbars=yes,location=no,height='+win_height+',width='+win_width+',top='+top+',left='+left);
       <?php

       }

}

global $application;

global $contact_us;

//Creates the form
$contact_us=new contact_us($application);

//Read from resource file
$contact_us->loadResource(__FILE__);

//Shows the form
$contact_us->show();

?>